/*
 * @(#) ArticleDao.java 2018年2月8日 下午5:34:04
 *
 * Copyright 2018 CIMIP, Inc. All rights reserved.
 * H-VISIONS PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
 */package cn.hc.share.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.hc.share.entity.Article;

public interface ArticleDao
{

	public int addArticle(Article article);
	
	public Article findArticleById(String id);
	
	public int updateArticle(Article article);

	public Article findDraftByAuthor(Article article);

	public List<Article> findAllArticleByPage(
			@Param("menuId")List<String> menuId,
			@Param("tagId")String tagId,
			@Param("title")String title,
			@Param("start") int start,		//pageSize*(page-1)
			@Param("pageSize") int pageSize,
			@Param("category") String category);
	
	//通过tagId获取文章
	public List<Article> findAllArticleByTag(
			@Param("tagId")String tagId,
			@Param("start") int start,		//pageSize*(page-1)
			@Param("pageSize") int pageSize,
			@Param("category") String category);
	
	public int countArticles(
			@Param("menuId")List<String> menuId,
			@Param("tagId")String tagId,
			@Param("title")String title,
			@Param("category") String category);
	
	public int countArticlesByTag(
			@Param("tagId")String tagId,
			@Param("category") String category);
	
}










